package com.guqj.pattern.builder.client;

import java.util.ArrayList;
import java.util.List;

import com.guqj.pattern.builder.builder.TraxexBuilder;
import com.guqj.pattern.builder.director.Director;
import com.guqj.pattern.builder.hero.Traxex;
import com.guqj.pattern.builder.modal.Equipment;
import com.guqj.pattern.builder.modal.Level;
import com.guqj.pattern.builder.modal.Skill;

public class BuilderClient {

	public static void main(String[] args) {
		TraxexBuilder builder = new TraxexBuilder();
		Director director = new Director(builder);
		director.construct("amio1", Level.Level_25, getSkills(), getEquipments());
		Traxex traxex = builder.build();
		System.out.println(traxex);
	}

	// 创建技能列表
	private static List<Skill> getSkills() {
		List<Skill> skills = new ArrayList<>();
		skills.add(Skill.IceArrow);
		skills.add(Skill.SilentMagic);
		skills.add(Skill.TrueshotAura);
		skills.add(Skill.ArcherTalent);

		return skills;
	}

	// 创建装备列表
	private static List<Equipment> getEquipments() {
		List<Equipment> equipments = new ArrayList<>();
		equipments.add(Equipment.Fly);
		equipments.add(Equipment.Avatar);
		equipments.add(Equipment.Cannon);
		equipments.add(Equipment.Invisible);
		equipments.add(Equipment.BKB);
		equipments.add(Equipment.TrueEye);

		return equipments;
	}
}
